package com.pubinfo.passbook.common.model.eop;

import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.math.BigDecimal;
import java.util.ArrayList;
import java.util.List;

@Data
public class QuickChoiceOfferOrderItemDto {

    @ApiModelProperty("8817013100010023-》202005迁改赔补费X元 固定值")
    private String promNbr;

    @ApiModelProperty("3010100000-》动作 新装  固定值")
    private String serviceOfferId;

    @ApiModelProperty("可选包节点")
    List<ChoiceOfferOrderItemAttr> choiceOfferOrderItemAttrs;

    @Data
    class ChoiceOfferOrderItemAttr {
        @ApiModelProperty("20000007001-》一次性费用金额（元） 固定值")
        private String attrId;

        @ApiModelProperty("金额")
        private BigDecimal attrValue;
    }

    public QuickChoiceOfferOrderItemDto(BigDecimal attrValue) {
        super();
        this.promNbr = "8817013100010023";
        this.serviceOfferId = "3010100000";
        List<ChoiceOfferOrderItemAttr> attrs = new ArrayList<>();
        attrs.add(new ChoiceOfferOrderItemAttr() {{
            setAttrId("20000007001");
            setAttrValue(attrValue);
        }});
        this.choiceOfferOrderItemAttrs = attrs;
    }

}
